package com.bskj.common.enums;

public enum NoSenseParkingErrorCodeEnum {
	ARGUMENTS_INCORRECT("ARGUMENTS_INCORRECT", "参数错误"),
	INVALID_SIGNATURE("INVALID_SIGNATURE","签名失败"),
	SYSTEMERROR("SYSTEMERROR", "系统超时"),
	PARAM_ERROR("PARAM_ERROR", "请求参数未按指引进行填写"),
	INVALID_REQUEST("INVALID_REQUEST", "非法请求"),
	VEHICLE_NOT_EXIST("VEHICLE_NOT_EXIST", "当前车牌尚未绑 定 车 主 平台，或用户已和车主平台解约"),
	OUT_TRADE_NO_USED("OUT_TRADE_NO_USED", "商户订单号重复"),
	ORDER_PAID("ORDER_PAID", "订单已支付"),
	ORDER_ACCEPTED("ORDER_ACCEPTED", "该订单已发起过扣款申请，无需再次请求"),
	ORDER_CLOSED("ORDER_CLOSED", "订单已关闭"),
	SIGN_ERROR("SIGN_ERROR", "签名错误"),
	CONTRACT_OVER_LIMIT("CONTRACT_OVER_LIMIT", "支付笔数、或支付金额超出代扣限额"),
	REQUEST_BLOCKED("REQUEST_BLOCKED", "用户欠费或者不符合微信免密业务要求");

	private String key;
	private String value;

	private NoSenseParkingErrorCodeEnum(String key, String value) {
		this.key = key;
		this.value = value;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public static NoSenseParkingErrorCodeEnum get(String key) {
		for (NoSenseParkingErrorCodeEnum errorCode : NoSenseParkingErrorCodeEnum.values()) {
			if (errorCode.getKey() == key) {
				return errorCode;
			}
		}
		return null;
	}
}
